import request from "./../utils/request.js"
import { HTTP_REQUEST_URL_PHOTO } from "./../config.js"

export function GetContractEncodeInfo(data){
	return request.post('VisaLogin/GetContractEncodeInfo',data,{
		noAuth:true
	})
}
export function GetContractInfo(data){
	return request.get('VisaLogin/GetContractInfo',data,{
		noAuth:true
	})
}

export function getuserinfo(data){
	return request.get('v1/auth/getuserinfo',data,{
    noAuth: false
  });
}
/**
 * 获取授权登录login
 */
export function getLogo() {
  return request.get('wechat/get_logo', {}, {
    noAuth: true
  });
}

export function bind(data) {
  return request.post('VisaLogin/PhoneLogin', data, {
    noAuth: false
  });
}

export function getCodeLogin(code) {
  return request.post('VisaLogin/CustomerLogin', {
    code
  }, {
    noAuth: true
  });
}

export function getRegisterSendMsg(phone) {
  return request.post('VisaLogin/RegisterSendMsg', {
    phone
  }, {
    noAuth: true
  });
}

export function registerCustomerpost(data) {
  return request.post('VisaLogin/RegisterCustomer', data, {
    noAuth: true
  });
}


/**
 * 获取banner和首页数据
 */
export function getBanners(data) {
  return request.get('VisaProduct/GetBanner', data, {
    noAuth: true
  });
}

// 获取所有可选择城市(预约国家)
export function getOptionalCity() {
  return request.get('VisaProduct/GetOptionalCity', {}, {
    noAuth: true
  });
}
// 根据城市获取可预约国家信息
export function getAppointmentCountry(city) {
  return request.get('VisaProduct/GetAppointmentCountry', city, {
    noAuth: true
  });
}
// 热门国家
export function getHotCountry() {
  return request.get('VisaProduct/GetHostCuntry', {}, {
    noAuth: true
  });
}

// 查找国家  
export function searchKeyWordsList(keys) {
  return request.get('VisaProduct/SeachCountry', {
    keys
  }, {
    noAuth: true
  });
}
// 获取用户余额
export function getUserBalance() {
  return request.get('UserInfo/GetUserBalance', {
    noAuth: true
  })
}
// 账单明细
export function getBillFlowAll(data) {
  return request.get('UserInfo/GetBillFlowAll', data, {
    noAuth: false
  });
}
// 获取充值产品
export function getCrrechargeProduct() {
  return request.get('VisaProduct/GetCrrechargeProduct', {
    noAuth: false
  });
}

// 充值下单
export function rechargeProductOrder(data) {
  return request.post('PayMent/RechargeProductOrder', data, {
    noAuth: false
  });
}
// 获取优惠券
export function getUserCoupons() {
  return request.get('UserInfo/GetAllEffectiveCoupon', {
    noAuth: false
  });
}

// 获取失效券
export function getUserInvalidCoupons() {
  return request.get('UserInfo/GetAllInvalidCoupon', {
    noAuth: false
  });
}

// 获取邮寄详情
export function getLogisticsFlows(orderId) {
  return request.get('VisaOrder/GetLogisticsFlows', {
    orderId
  }, {
    noAuth: false
  });
}

// 帮助界面获取图文
export function getHelperDetail(name) {
  return request.get('UserInfo/GetViasImgText', { name },{ noAuth: false });
}


// 获取公司信息
export function getCompany() {
  return request.get('UserInfo/GetCompany', {},{ noAuth: false });
}
// 保存公司信息
export function saveCompany(data) {
  return request.post('UserInfo/SaveCompany', data, {
    noAuth: false
  });
}

//扫描名片
export function businessCard(data){
  console.log("data",data)
  return request.get(`Register/BusinessCard?path=${data}`, {}, {
    noAuth: true
  });
}
// 获取用户信息
export function getInfo(data) {
  return request.get('Register/GetInfo', data, {
    noAuth: true
  } );
}

// 4. 获取token
export function registerLogin(data){
  
  return request.get(`Register/Login`,data,{noAuth: true});
}
 
// 提交注册
export function WXCheckRegister(data){
  return request.post('Register/WXCheckRegister', data, {
    noAuth: true
  });
}
//手机号码
export function getphone(data){
  return request.post('Register/GetPhone',data , {
    noAuth: true
  });
}
//发送邮件
export function sendEmailByUrl(data){
  return request.post('VisaProduct/sendEmailByUrl',data , {
    noAuth: true
  });
}
//发送资料邮件
export function sendDocListToEmail(data){
  return request.post('VisaProduct/SendDocListToEmail',data , {
    noAuth: false
  });
}
//公众号分享
export function share(data){
  return request.get('Share/ShareParameter',data , {
    noAuth: false
  });
}
//word转PDF
export function wordToPDF(data){
  return request.get('Tool/WordToPDF',data );
}



//< 证件照接口 >
export function getAllTags(data) {
  return request.get('product/getalltags', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

export function queryproductsort(data) {
  return request.get('product/queryproductsort1', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// 产品详情 product/getreplaceproduct
export function getreplaceproduct(data) {
  return request.post('product/getreplaceproduct', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// product/getproductnew
export function getproductnew(data) {
  return request.get('product/getproductnew', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// 图片安全检测 ContentSecurity/checkUrl
export function checkUrl(data) {
  return request.post('ContentSecurity/checkUrl', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// 磨皮美白 product/PhotoBeauty
export function PhotoBeauty(data) {
  return request.post('product/PhotoBeauty', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}
export function Make(data) {
  return request.post('Certificate/MakeSmallApp', data, {
    _api: 'VISA/'
  });
}


// 获取产品详细 product/getproduct
export function getProduct(data) {
  return request.post('product/getproduct', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// product/gettheme_new
export function gettheme_new(data) {
  return request.get('product/gettheme_new', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// 查询快递费 order/querycourierfee
export function queryCourierfee(data) {
  return request.get('order/querycourierfee', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// 图片处理 imageprocessing/imageprocessing
export function imageProcessing(data) {
  return request.post('imageprocessing/imageprocessing', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO,
    noAuth: false
  });
}

// auth/GetUserInfo
export function getUserInfo(data) {
  return request.get('auth/GetUserInfo', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}

// /imageprocessing/ImageProcessingNew
export function ImageProcessingNew(data) {
  return request.post('imageprocessing/ImageProcessingNew', data, {
    _api: 'app_api/v1/',
    url: HTTP_REQUEST_URL_PHOTO
  });
}


 
 